home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 22
/
Cream of the Crop 22.iso
/
program
/
eflibpt4.zip
/
DEMO
/
DEVICES
/
KEYBOARD.PAS
next >
Wrap
Pascal/Delphi Source File
|
1996-08-16
|
1KB
|
28 lines
{ Borland Pascal Extended Function Library - EFLIB (C) Johan Larsson, 1996
Demonstration; keyboard handling
EFLIB IS PROTECTED BY THE COPYRIGHT LAW AND MAY NOT BE COPIED, SOLD OR
MANIPULATED. FOR MORE INFORMATION, SEE PROGRAM MANUAL! THIS DEMONSTRAT-
ION PROGRAM MAY FREELY BE USED AND DISTRIBUTED. }
uses EFLIBDEF, EFLIBKBD;
{ Incorporate EFLIBDEF and EFLIBKBD units }
begin
{ Wait for ALT to be pressed }
WriteLn ('Welcome to EFLIB - press the ALT key!');
repeat until Keyboard.AltPressed;
{ Wait for CTRL to be pressed }
WriteLn ('And now press the CTRL key!');
repeat until Keyboard.CtrlPressed;
{ Wait for a key press; look at (peek) the key and check character and
then read the key from the keyboard buffer and return it's scan code. }
WriteLn ('... and any of your own choice!');
repeat until Keyboard.KeyPressed; { Wait for a key }
WriteLn ('You pressed: ', Keyboard.PeekKey, ' [', Keyboard.ReadScanCode, ']');
WriteLn ('Good bye!');
end.